package OrderProxy;

import fenkufenbiao.IOrderService;
import fenkufenbiao.Order;
import fenkufenbiao.OrderService;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @program: homeWork
 * @description:
 * @author: hezhiqin
 * @create: 2019-09-28 08:25
 */
public class Test {

    public static void main(String[] args) {
        Order order = new Order();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
        Date date = null;
        try {
            date = sdf.parse("2018/02/01");
        } catch (ParseException e) {
            e.printStackTrace();
        }
        order.setCreateTime(date.getTime());
        IOrderService orderService = (IOrderService)new OrderServiceDynamicProxy().getInstance(new
                OrderService());
        orderService.createOrder(order);
    }
}
